﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 外观模式
{
    internal class Fund
    {
        Stock1 stock1;

        NationalDebt1 nationalDebt1;

        Realty1 realty1;

        public Fund()
        {
            this.stock1 = new Stock1();
            this.nationalDebt1 = new NationalDebt1();
            this.realty1 = new Realty1();
        }

        public void BuyFund()
        {
            this.stock1.Buy();
            this.nationalDebt1.Buy();
            this.realty1.Buy();
        }

        public void SellFund()
        {
            this.stock1.Sell();
            this.nationalDebt1.Sell();
            this.realty1.Sell();
        }
    }
}
